<template>
  <div>
    <div ref='MyDiv'>内容</div>

    <button @click='fn'>修改内容</button>
  </div>
</template>
 
<script>
export default {
  data() {
    return {}
  },
  methods:{
    fn(){
        this.$refs.MyDiv.innerHTML = '今天是个好日子'
    }
  }
}
</script>

<style scoped>
</style>